using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;

namespace Data.Database
{
    public class Adapter
    {
        private SqlConnection sqlConn = new SqlConnection();
        const string consKeyDefaultCnnString = "ConnStringLocal";

        public SqlConnection SqlConn
        {
            get 
            {
              return sqlConn;
              
            }
            set 
            { 
                sqlConn=value;
                
            }
        
        }
        
        protected void OpenConnection()
        {
         
         String constri=ConfigurationManager.ConnectionStrings[consKeyDefaultCnnString].ConnectionString;
         sqlConn = new SqlConnection(constri);
         sqlConn.Open();
        }

        protected void CloseConnection()
        {
           SqlConn.Close();
            SqlConn = null;
            
        }

        protected SqlDataReader ExecuteReader(String commandText)
        {
            throw new Exception("Metodo no implementado");
        }

       
    }
}
